// 目录相关操作接口


import ajax from '@/ajax/index';
const baseUrl = '/bi';
// const baseUrl = '';
//获取大屏目录和大屏list
export const getFileListApi = (data) => ajax.post(`${baseUrl}/report/groupPageList`, data);

//获取目录list
export const getCatalogueListApi = (data = {}) => ajax.post(`${baseUrl}/reportCatalog/getReportCatalogPage`, data);

// 添加目录
export const addCatalogueApi = (data) => ajax.post(`${baseUrl}/reportCatalog/addCatalog`, data);

// 添加大屏或者报表
export const addFileApi = (data) => ajax.post(`${baseUrl}/report/add`, data);

// 删除目录
export const deleteCatalogueApi = (id) =>
    ajax.get(`${baseUrl}/reportCatalog/deleteByIds`, {
        params: {
            id
        }
    });

// 删除大屏目录或者大屏
export const deleteScreenAndApi = (params) =>
    ajax.get(`${baseUrl}/report/delete`, {
        params: {
            ...params
        }
    });
